using System;
using System.Collections.Generic;
using System.Text;

namespace CSScript_Cons_Interpreter
{
    class Program
    {
        static void Main(string[] args)
        {

            CSScript.BLogic.Runtime.Compiler comp = new CSScript.BLogic.Runtime.Compiler();
            if (comp.Compile(System.IO.File.ReadAllText(args[0])))
            {
                List<string> rtargs = new List<string>(args);
                rtargs.RemoveAt(0);
                comp.Run(rtargs.ToArray());
            }
            else
            {
                System.Windows.Forms.MessageBox.Show(comp.Error.Message);
            }
        }
    }
}
